package imagekeeper.data;

import java.sql.Connection;
import java.sql.SQLException;
import imagekeeper.data.mapping.ImageMapper;


class SqlStatementSelectImage extends SqlStatement {
    private final static String ParamImageId = "imageId";
    
    public SqlStatementSelectImage(Connection con) throws SQLException {
        statement = con.prepareCall("{call " + ImageMapper.SpSelectImage + "(?)}");
    }
    
    public SqlStatementSelectImage(Connection con, int imageId) throws SQLException {
        this(con);
        statement.setInt(ParamImageId, imageId);
    }
    
    public void setImageId(int id) throws SQLException {
        statement.setInt(ParamImageId, id);
    }
}
